package day05;

public class Test06 {
    public static void main(String[] args) {
        int[] arr = { 1, 2, 3, 4, 5};
        System.out.println(max(arr));
    }

    public static int max(int[] arr) {
        int j = 0;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] > j) {
                j = arr[i];
            }
        }
        return j;
    }
}
